import request from '@/utils/request.js'


// 获取openid
export function getOpenid(code) {
	return request({
		method: 'get',
		url: `/wechatApplet/customer/user/login/${code}`,

	})
}
// 获取个人信息
export function getUserInfo(id) {
	return request({
		method: 'get',
		url: `/wechatApplet/customer/user/${id}`,

	})
}
// 修改个人信息
export function putUserInfo(data) {
	return request({
		method: 'put',
		url: `/wechatApplet/customer/user/`,
		data
	})
}
// 字典  
export function getListByType(data) {
	return request({
		method: 'get',
		url: '/common/commonDic/getListByType?type=' + data,

	})
}
// banner 
export function banner(data) {
	return request({
		method: 'get',
		url: `/wechatApplet/customer/banner/`,
		data
	})
}
// 导航2
export function customerIndex(data) {
	return request({
		method: 'get',
		url: `/wechatApplet/customer/index/`,
		data
	})
}
// 获取已打卡景点
export function activity(userId) {
	return request({
		method: 'get',
		url: `/wechatApplet/customer/activity/${userId}`,
	})
}
// 用户反馈
export function feedBack(data) {
	return request({
		method: 'post',
		url: `/wechatApplet/customer/feedBack/`,
		data
	})
}
// 获取信息（信息分类（1：联系电话，2：常见问题，3：用户须知））
export function customerInfo(type) {
	return request({
		method: 'get',
		url: `/wechatApplet/customer/info/${type}`,
		
	})
}
// 新闻列表
export function news() {
	return request({
		method: 'get',
		url: `/wechatApplet/news/`,
		
	})
}
// 新闻详情
export function newsDetail(id) {
	return request({
		method: 'get',
		url: `/wechatApplet/news/${id}`,
		
	})
}
// 小程序景点
export function scenicList(data) {
	return request({
		method: 'get',
		url: `/wechatApplet/customer/scenic/`,
		data
	})
}
// 景点详情
export function scenicDetail(id) {
	return request({
		method: 'get',
		url: `/wechatApplet/customer/scenic/${id}`,
		
	})
}
//  获取openId
export function codeLogin(code) {
	return request({
		method: 'get',
		url: ` /wechatApplet/customer/user/login/${code}`,
		
	})
}
// 打卡图片比对
export function userCheckIn(data) {
return request({
		method: 'post',
		url: `/wechatApplet/customer/activity/userCheckIn/`,
		data
	})
}